import React from 'react'
const { $fn, $Lazy } = window
// ===================================================================== private template
const Menu = $Lazy.load(()=>import('#frame/menu'))
// ===================================================================== public
const permissions = { title: '关联权限库', path: 'permissions', cache:true, component:'system-manage/_public/permissions' }
// ===================================================================== 系统设置
class Index extends React.Component{
	state = {
		data:[]
	}
	
	skip = { to: 'system-settings/login-logging' }
	
	child = [
		// 项目设置
		{
			id: 'xmqd', 
			parent: '/system-settings/project-settings/test-project',
			children: [
				{ title: '设置单一项目', 	path: 'set-single-project', component:'system-settings/project-settings/test-project/set-single-project', cache:true,
					children: [
						{ title: '项目关联', path:'project-related', component:'laboratory-manage/device/project-related'},
					]
				},
				{ title: '新增从属项目', 	path: 'new-add-project', component:'system-settings/project-settings/test-project/new-add-project', cache:true},
				{ title: '设定组合项目', 	path: 'set-group-project', component:'system-settings/project-settings/test-project/set-group-project', cache:true},
				{ title: '设置营销项目', 	path: 'set-marketing-project', component:'system-settings/project-settings/test-project/set-marketing-project', cache:true},
				$fn.menu.preview_report, // 预览报告单
			]
		},
		{
			id: 'xmqd', 
			parent: '/system-settings/project-settings/device-plan',
			children: [
				{ title: '校准记录', path: 'calibration-record', component:'system-settings/project-settings/calibration-record' },
			]
		},
		// 配置模板
		{
			id: 'dcgzsz', 
			parent: '/system-settings/derived-rule',
			children: [
				{ title: '配置模板', 	path: 'template-configuration' },
			]
		},
		// 公司管理
		{
			id: 'jtsc', 
			parent: '/system-settings/group-settings/group-set',
			children: [
				{ title: '公司管理', 	path: 'company-manage',component:'system-manage/organizational-manage/company-manage', cache:true ,
					children: [
						{ title: '部门管理', path: 'department-manage', cache:true, component:'system-manage/organizational-manage/department-manage',
							children:[
								{ title: '科室管理', path: 'keshi-manage', cache:true, component:'system-manage/organizational-manage/keshi-manage',
									children: [
										{ title: '岗位管理', path: 'post-manage', cache:true, component:'system-manage/organizational-manage/post-manage',
											children:[
												{ title: '员工管理', path: 'employee-manage', cache:true, component:'system-manage/organizational-manage/employee-manage',
													children:[
														permissions
													]
												}
											]
										}
									]
								}
							]
						}
					]
				},
			]
		},
		// 版本
		{
			id: 'drmbgl', 
			parent: '/system-settings/import-template',
			children: [
				{ title: '版本', 	path: 'check-version' }
			]
		},
		// 外包岗位设置
		{
			id: 'jtsc',
			parent: '/system-settings/group-settings/internal-outsourcing',
			children: [
				{ title: '项目管理', path: 'project-management' }
			]
		}
	]
	
	componentDidMount(){
		$fn.getMenu.call(this, 'xitongshezhi', this.child)
	}
	
	render(){
		return <Menu data={this.state.data} skip={ this.skip } />
	}
}

export default Index